Intersection Types as Logical Formulae

نویسنده

  • Betti Venneri
چکیده

The aim of this paper is to investigate, in the Curry-Howard isomorphism approach, a logical characterization for the intersection-type discipline First a novel formulation of the intersection type inference for combinatory logic is presented, such that it is equivalent to the original version of the system, while the intersection operator is no longer dealt with as a proof-theoretical connective Then a Hilbert-style axiomatization is defined and proved to totally parallel lntersecOon-denvability, in such a way that inhabited intersection-types are all and only the provable formulae in the logic system KeywordsCombinatory logic, type inference, Curry—Howard isomorphism, relevance logic 1 Background and motivations The present paper answers the question of finding a logical system relating to the intersection type discipline. Intersection types have been introduced in [3] and [2] as a generalization of Curry's type inference system, in order to neatly characterize a larger class of terms. The main idea is the introduction of a new type-forming operator, the intersection A, whose introduction and elimination rules are: /ATN BYM :a BYM : r ,A PN B YM : a A r _ v ' BYM :a AT ^ B YM : a (B h M : T) " The extended system, TAA, turns out to be significantly more powerful, since it allows the typing of exactly the strongly normalizable terms (terminating programs). Reynolds showed how the type-operation of intersection can be useful to clarify many concepts of ALGOL-like programming languages ([16]), whereas filter-models of A-calculus were devised in [2] by using A-types. A very interesting approach to type disciplines, set out as formulae-as-types or the 'CurryHoward isomorphism' [9], is the mapping of constructive proofs of logical formulas into programs (A-terms or combinators) of related types and conversely. Thus a logical meaning for the type constructors is provided while logical systems can be seen in a computational way. As far as the simple types of Curry's system are concerned, the well known analogy with the implicational fragment of intuitionistic propositional logic is quite natural. Roughly speaking, an arrow-type of the shape a -4 /? is paralleled by the implicational formula A -y B, where the elimination and introduction rules for the arrow in types correspond, respectively, to the introduction and elimination rules for implication in natural deduction. The simple type discipline has been extended to stronger systems, still prompted by the CurryHoward isomorphism. In particular, secondand higher-order logics can be dealt with by introducing connectives and quantifiers (of suitable order) on types, thus generating Girard's systems F and Fu (see [6] for a thorough account of formulae-as-types). For TA^, however, the question 'what is the corresponding logical system like?', J LofkComfmtal..Voi 4 No X pp. 109-124 1994 © OrfonJ \Mva&y; PreM 110 Intersection Types as Logical Formulae has not yet been answered. Let us consider where the difficulty lies. The logical characterization of Curry's inference system for combinatory logic can be expressed by the following equation: set of inhabited —t-types = set of possible types of combinators (closed X-terms) = set of theorems of the logic L_, where L_, is defined thus: 1. formulas are propositional formulas built by implication 2. the only deduction rule is 'modus ponens' 3. the axiom schemes are (;4 -> (B -»• C)) -> ((A -+ B)-+(A-¥ C)). Since TAA extends Curry's system by adding a new type constructor with corresponding rules, it is reasonable to look for a logic LA, extending L_, both in the language and in the set of axioms and rules, such that the above equality holds between LA and TAA. Difficulties arise from the specific shape of the (Al)-rule, saying that a term has (a deduction proves) a type (a formula) a A r if and only if this term has (the same deduction proves) both a and r. So the first candidate to be a parallel of intersection seems to be a restricted form of the usual propositional conjunction &: in other words, the provability of a conjunctive formula AhB must require that both the conjuncts are provable by proofs with the same structure. In such a system, the &-introduction rule would be constrained by a global condition of applicability, involving the shape of the whole subderivations. These features led some authors to investigate intersection as a proof-theoretic operator, in the context of 'untyped terms as realizers of logical formulae'. Lopez-Escobar first referred to A as '...the first...connective which is truly proof-functional' [10]. Following that approach, in [12] and [1] a first-order logic was defined to derive predicate formulas such as .RA[M] , meaning 'the A-term M realizes the propositional formula A'. Actually, in this logic no specific rule is given to represent the A-derivability; the predicate RAAB[M] is proved by the proof of the predicate RA[M]8ZRB[M], which is defined as equivalent to the former one since the two subjects of the predicates connected by Sz are equal (& is the usual conjunction). Completely different, our quest for a logic LA matching TAA requires intersection to be paralleled by only using propositional connectives and the derivability of intersection types to be completely represented in a logical Hilbert-style axiomatization. We will do that in two steps. First, we shall define a new type inference system proved to be equivalent to Tv4A, in which no rule involves any global metalinguistic requirements (Section 2). Let us recall that such requirements are common in standard logical systems, for example in the form of side conditions on variables occurring free in assumptions in the V-introduction. What we will avoid is any proof-functional condition for rule's applicability, involving relations on subderivations. The novel formulation of TA^,, in addition to allowing a smooth solution to our original problem, comes to be interesting in its own right. By providing structural rules to derive intersection types, it can indicate a way to deal with some syntactical questions, such as the problem of finding decidable, yet powerful restrictions of TAALastly, we will define the logical axiomatization LA (Section 4), whose inference rules do not contain the usual ^-introduction whereas they are all admissible rules in the conjunctive implicational calculus (see Remark 4.9). Intersection Types as Logical Formulae 111 2 Intersection types for combinatory logic Let us outline the inference system of intersection types for combinatory logic terms, (TAA) which has been defined in [4] as a translation of the original formulation of A-type assignment for A-calculus TAAX [3]. Let us notice that the type system of [4] introduces both intersection types and the universal type u) meaning the 'undefined' value, so the corresponding TAA\ is the A-w-type discipline. In the present paper the intersection type theory is studied without the universal type. However, the proof of the correspondence between TAA\ and TAA when type u> is omitted is a trivial restriction of that one presented in [4]; thus for the formulation of T AA as well as main properties of the system we shall simply refer to [4]. In what follows the reader is assumed to be familiar with combinatory logic (see Chapter 2 of [8]). We shall only recall main definitions and usual notations. DEFINITION 2.1 (Combinatory logic terms) Assume that there is given an infinite set of variables. Let B denote any fixed basis of basic (initial) combinators B = {Ci, C2, • • •}• CLB-terms are built out of variables and C\, C2, • • • by application. An atom is a variable or a basic combinator. A closed term (combinator) is a term whose only atoms are C i ,C2 , . . . Each atomic combinator is assumed to have an axiom-scheme defining its contraction rule, i.e. where £>, is a combination of some or all of x\,..., xn and no other atoms. We say that a term U reduces to V (U y V) iff V is obtained from U by a finite series of contractions (weak reduction). NOTATION 2.2 To avoid parentheses, we assume that application of terms associates to the left. In what follows B is assumed to be any combinator complete basis, that is any set of initial combinators such that, for each sequence of variables x\,..., xn and each CLB-term Y, there exists a CLB-term denoted by \*X\... xn.Y, containing none of X\,..., xn, with the following property: (\*xi...xn.Y)xi...xn yY. Let us recall that if B is complete then there always exists an abstraction-algorithm to compute such a A ' x i . . . xn.Y for B. A well known complete basis is B = {S, K, 1} where • Sfgx y fx(gx) (strong composition operator) • Kxy >x (operator for forming constants) • Ix y x (identity operator). Actually I can be obtained from S and K, so the minimal complete basis is {S, K}, but it is usual to assume it as atomic combinator. DEFINITION 2.3 (Types) Assume that we have infinitely many type-variables a,/9,7,<5, ao .a i , The set T of types is inductively defined thus: 112 Intersection Types as Logical Formulae 1. All type-variables are types. 2. If a and r are types, then so is a -¥ T (arrow-types). 3. If a and r are types, then so is a A T (intersection-types). NOTATION 2.4 We assume that 'A' takes precedence over '-»•' and '->' associates to the right. A preorder relation on types naturally comes by thinking of the A-operator as the usual intersection on sets. DEFINITION 2.5 The < relation on T is inductively defined by the following axiom schemes and rules: Axiom schemes l.T • p) A (a ->• r ) < a -> p A T.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Intersection Logic in sequent calculus style

The intersection type assignment system has been designed directly as deductive system for assigning formulae of the implicative and conjunctive fragment of the intuitionistic logic to terms of lambda-calculus. But its relation with the logic is not standard. Between all the logics that have been proposed as its foundation, we consider ISL, which gives a logical interpretation of the intersecti...

متن کامل

Linearly Refined Session Types

Session types capture precise protocol structure in concurrent programming, but do not specify properties of the exchanged values beyond their basic type. Refinement types are a form of dependent types that can address this limitation, combining types with logical formulae that may refer to program values and can constrain types using arbitrary predicates. We present a pi calculus with assume a...

متن کامل

HaskSAT: an Embedded DSL for SMT Queries

As SAT and SMT solvers have improved, it has become common to reduce difficult search problems to satisfiability queries in an appropriate logic. While expressing the queries is often straightforward at the high-level of the problem domain, converting to low-level logical formulae can be tedious, difficult, time consuming, and error prone. In addition, there are many data types, like bounded qu...

متن کامل

Graph Logics with Rational Relations

We investigate some basic questions about the interaction of regular and rational relations on words. The primary motivation comes from the study of logics for querying graph topology, which have recently found numerous applications. Such logics use conditions on paths expressed by regular languages and relations, but they often need to be extended by rational relations such as subword or subse...

متن کامل

Towards an Intersection and Union Logic

A logical foundation for the intersection and union types assignment system (IUT) is proposed. We present Intersection-Union Logic (IUL) as an extension of Intersection Logic (IL) by adding rules for union and we examine some properties of this system and its relation with intuitionistic minimal logic.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Log. Comput.

دوره 4  شماره 

صفحات  -

تاریخ انتشار 1994